<template>
  <div class="column">
    <router-view/>
    <div class="panelAll" >
      <div class="boxb3"><h2>重点服务业企业销售完成情况(年销售亿元以上企业)</h2></div>
      <v-table :model="0" :header="this.header" :body="this.body"/>
      <div class="panelSmLonggy-foot"></div>
    </div>
  </div>
</template>

<script>
import axios from 'axios';
import * as echarts from "echarts";
export default {
  name: "my9",
  mounted() {
    this.$parent.reverseColor8();
  },
  methods: {
    getdata() {
      axios.get('http://localhost:9090/tradeAndService/getCompletionOfServiceIndustry', {
        params: {
          year: this.year,
          month:this.month,
        }
      }).then(res => {
        this.body = res.data
        this.header[3].name = this.month+''+'月当月(万元)'
        this.header[4].name = this.month+''+'月止累计(万元)'
      })
    },
  },

  watch: {
    '$parent.selectedYear': {
      immediate: true,
      handler(v) {
        this.year = v
      }
    },
    '$parent.selectedMonth': {
      immediate: true,
      handler(v) {
        this.month = v
        this.getdata();
      }
    }
  },
  data() {
    return {
      newDate: new Date(),
      month: null,
      year: null,

      header: [
        {
          name: "序号",
          value: "number",
        },
        {
          name: "所属行业",
          value: "industry",
        },
        {
          name: "企业名称",
          value: "name",
        },
        {
          name: "8月当月(万元)",
          value: "thisMonth",
        },
        {
          name: "8月止累计(万元)",
          value: "accumulate",
        },
        {
          name: "同比±%",
          value: "monthOnMonth",
        },
      ],


      body: [],
    }
  }
}
</script>

<style scoped>

</style>